import request from "@/utils/request";

// 查询出入库任务列表
export function listMdOutTask(query) {
  return request({
    url: "/meter/mdOutTask/list",
    method: "get",
    params: query,
  });
}

// 查询出入库任务详细
export function getMdOutTask(inTaskId) {
  return request({
    url: "/meter/mdOutTask/" + inTaskId,
    method: "get",
  });
}

// 新增出入库任务
export function addMdOutTask(data) {
  return request({
    url: "/meter/mdOutTask",
    method: "post",
    data: data,
  });
}

// 修改出入库任务
export function updateMdOutTask(data) {
  return request({
    url: "/meter/mdOutTask",
    method: "put",
    data: data,
  });
}

// 删除出入库任务
export function delMdOutTask(inTaskId) {
  return request({
    url: "/meter/mdOutTask/" + inTaskId,
    method: "delete",
  });
}

//修改出库任务状态
export function modifyIssueTaskStatus(data) {
  return request({
    url: "meter/mdOutTask/editStatus",
    method: "post",
    data: data,
  });
}

//新增出库明细
export function addReceiptDetails(data) {
  return request({
    url: "meter/mdOutTaskDetails",
    method: "post",
    data: data,
  });
}

//查询出库明细列表
export function queryDetailsList(query) {
  return request({
    url: "meter/mdOutTaskDetails/list",
    method: "get",
    params: query,
  });
}

//删除出库明细
export function delMdInTaskDetails(outTaskDetailsIds, outTaskNo) {
  return request({
    url: "/meter/mdOutTaskDetails/" + outTaskDetailsIds + "/" + outTaskNo,
    method: "delete",
  });
}

//修改出库明细
export function startBeSureDetailsExecution(data) {
  return request({
    url: "meter/mdOutTaskDetails",
    method: "put",
    data: data,
  });
}

//出库信息下载数据接口
export function jsonMdOutTask(query) {
  return request({
    url: "/meter/mdOutTask/downloadJsonMdOutTask",
    method: "get",
    params: query,
  });
}
